﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace VSA.Applications
{
    public partial class InfoEditGuideForm : Form
    {
        private EntranceForm mainForm;

        public InfoEditGuideForm()
        {
            InitializeComponent();
        }

        public InfoEditGuideForm(EntranceForm mainForm)
        {
            InitializeComponent();
            this.mainForm = mainForm;
        }

        private void EntranceForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            if(mainForm != null)
                mainForm.Show();
            this.Dispose();
        }

        private void btnNewPerson_Click(object sender, EventArgs e)
        {
            PersonInfoForm personInfoForm = new PersonInfoForm(0);
            personInfoForm.CallType = 1;
            personInfoForm.ListForm = null;
            personInfoForm.GuideForm = this;
            personInfoForm.Show();
            this.Hide();
        }

        private void btnNewCompany_Click(object sender, EventArgs e)
        {
            CompanyInfoForm companyInfoForm = new CompanyInfoForm(this, int.MinValue);
            companyInfoForm.Show();
            this.Hide();
        }

        private void btnNewProject_Click(object sender, EventArgs e)
        {
            ProjectInfoForm projectInfoForm = new ProjectInfoForm();
            projectInfoForm.Show();
            this.Hide();
        }
    }
}
